<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>

</body><%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript">
function processBack(response){
	alertMsg.correct(response.message);
	 $.pdialog.closeCurrent();
	 navTab.reload("${path }/admin/userMessageDm", "");
}
</script>
<c:choose>
	<c:when test="${model.id==0 ||empty model.id}">
		<c:set var="action" value="${path }/admin/userMessageDm/add.do"></c:set>
	</c:when>
	<c:otherwise>
		<c:set var="action" value="${path }/admin/userMessageDm/update.do"></c:set>
	</c:otherwise>
</c:choose>
<div class="pageContent">
	<form method="post" action="${action }" class="pageForm required-validate" onsubmit="return validateCallback(this, processBack);">
		<input name="id" type="hidden" size="75" value="${model.id }"/>
		<input type="hidden" name="rel" value="${rel}"/>
		<div class="pageFormContent" layoutH="57" align="left">
			<p class="nowrap">
            	<label>发送人：</label>
				<input name="sender" type="text"  value="${model.sender }"  />            
			</p>
            <p class="nowrap">
				<label>发送时间：</label>
				<input type="text" name="sendTime" value="<fmt:formatDate value='${model.sendTime}' pattern='yyyy-MM-dd HH:mm:ss' />" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true">
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p>
            <p class="nowrap">
				<label>过期时间：</label>
				<input type="text" name="overTime" value="<fmt:formatDate value='${model.overTime}' pattern='yyyy-MM-dd HH:mm:ss' />" class="date" dateFmt="yyyy-MM-dd HH:mm:ss" readonly="true">
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p>
			<p class="nowrap">
                <label>发送类型：</label>
	            <select id="sendType" name="sendType" >
 					<c:forEach var="userMessageSendTypeMap" items="${userMessageSendTypeMap}">
						<option value="${userMessageSendTypeMap.key }">${userMessageSendTypeMap.value }</option>
					</c:forEach>
	            </select>
           		<script type="text/javascript">
					$("#sendType").val("${model.sendType}");
				</script>
            </p>           
			<p class="nowrap">
                <label>平台：</label>
	            <select id="applicableId" name="applicableId" >
 					<c:forEach var="applicablePlatformMap" items="${applicablePlatformMap}">
						<option value="${applicablePlatformMap.key }">${applicablePlatformMap.value }</option>
					</c:forEach>
	            </select>
           		<script type="text/javascript">
					$("#applicableId").val("${model.applicableId}");
				</script>
            </p>           
		</div>
		<div class="formBar">
			<ul>
				<li>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div>
				</li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">返回</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>

</html>